﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Zove.Desktop {
    public partial class InputDialog : Form {

        string fileName = string.Empty;

        private FileInfo fi = null;

        public InputDialog(string fileName) {
            this.fileName = fileName;
            fi = new FileInfo(fileName);
        }

        public InputDialog() {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e) {
            fi.MoveTo(fi.Directory + "\\" + this.textBox1.Text + this.fi.Extension);
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e) {
            this.Close();
        }

        private void InputDialog_Load(object sender, EventArgs e) {
            this.textBox1.Text = fi.Name;
        }
    }
}
